package com.leslie.ai.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.leslie.ai.domain.TestEntity;
import com.leslie.ai.mapper.TestEntityMapper;
import com.leslie.ai.service.TestEntityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * ServiceImpl
 *
 * @author Leslie Lee
 * @TIME 1956/09/12
 * @Version 2003/04/01
 */
@Service
public class TestEntityServiceImpl extends ServiceImpl<TestEntityMapper, TestEntity> implements TestEntityService {

    @Override
    public List<TestEntity> queryTestEntityList(TestEntity o) {
        return this.baseMapper.queryTestEntityList(o);
    }

    @Override
    public int deleteById(Integer id) {
        return this.baseMapper.deleteById(id);
    }

    @Override
    public int updateById(Integer id) {
        TestEntity testEntity = new TestEntity();
        testEntity.setId(id);
        testEntity.setIsDelete(0);
        return this.baseMapper.updateById(testEntity);
    }
}